浏览量 4587
2018/09/13 19:18
[root@wz ~]#cat gzip.sh
#!/bin/bash
gzip -t web.tar.gz
if [[ 0 == $? ]]; then
echo "good zip"
else
echo "bad zip"
fi
gzip -t web.tar.gz && echo "good zip" || echo "bad zip"
[root@TENCENT64site ~]#bash gzip.sh
good zip
good zip
上一篇 搜索 下一篇